﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;
using CQIE.TES.Model;
using Newtonsoft.Json.Linq;

namespace CQIE.TES.IService
{
    public interface IStudentService
    {
        void Test();

        //数据访问层接收业务逻辑层的方法
        List<Student> GetStudentsPage(int pageNum, int pageSize, string search, out int count);//子类具体实现该接口
        [Obsolete]
        List<Student> SearchStudent(string nameSearch);
        /// <summary>
        /// 逻辑删除学生
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DeleteStudent(int id);
        /// <summary>
        /// 添加学生
        /// </summary>
        /// <param name="id"></param>
        /// <param name="data"></param>
        /// <returns></returns>
        void UpdateStudent([FromBody] JObject data);
        /// <summary>
        ///重置学生密码
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool ResetPassWord(int id);

        /// <summary>
        /// 编辑学生
        /// </summary>
        /// <param name="id">通过id找到学生</param>
        /// <param name="data">前端返回的json格式的数据</param>
        /// <returns></returns>
        bool EditStudent(int id, string studentName, int sex, bool isFreeze, string studentNumber, string passWord, int classID);

        /// <summary>
        /// 学生登录
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        Student Login(string username, string password);

        Student Get(int sid);
    }
}
